<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title> Yoka365 </title>

    <!-- Sets initial viewport load and disables zooming  -->
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">

    <!-- Makes your prototype chrome-less once bookmarked to your phone's home screen -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!-- http://www.bootcdn.cn/pace/ -->
		<link href="http://cdn.bootcss.com/pace/1.0.2/themes/black/pace-theme-center-circle.css" rel="stylesheet" />

    <link href="http://cdn.bootcss.com/ratchet/2.0.2/css/ratchet.min.css" rel="stylesheet">
    <link href="http://cdn.bootcss.com/ratchet/2.0.2/css/ratchet-theme-ios.min.css" rel="stylesheet">
		<style>
		form {
			padding: 10px;
		}
		</style>
  </head>
  <body>
			<header class="bar bar-nav">
				<h1 class="title">留言反馈</h1>
			</header>

			<div class="content">
				<form onsubmit="return false;">
					<textarea rows="5" id="msgContent" placeholder="留言内容"></textarea>
					<button class="btn btn-positive btn-block" id="btnPost">确定</button>
				</form>
			</div>
  </body>
</html>

<script src="http://cdn.bootcss.com/fastclick/1.0.3/fastclick.min.js"></script>
<script src="http://cdn.bootcss.com/zepto/1.1.4/zepto.min.js"></script>
<script src="http://cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>

<script type="text/javascript">
$(function(){
	FastClick.attach(document.body);

	$('#btnPost').click(function(e){
		var msg = $('#msgContent').val();
		if(!msg){
			alert('请先填写留言内容哦！');
			return;
		}
		Pace.track(function(){
			$.post('/ibid/leave-msg', msg, function(data){
				if(data.flag){}

				alert('谢谢关注，我们会及时回复您的！');
				$('#msgContent').val('');
			});
		});
	});
});
</script>